﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ucListArticle.ascx.cs"
    Inherits="SES.CMS.AdminCP.PageUC.ucListArticle" %>
<h2>
    Danh sách Tin tức</h2>
<div style="width: 90%; float: left; margin-bottom: 30px;">
    Lựa chọn theo Danh mục:
    <asp:DropDownList ID="cboCategory" CssClass="ddl-input" Width="250px" runat="server"
        AutoPostBack="True" OnSelectedIndexChanged="cboCategory_SelectedIndexChanged"
        AppendDataBoundItems="true">
        <asp:ListItem Value="0" Text=".: Chọn toàn bộ :."></asp:ListItem>
    </asp:DropDownList>
</div>
<div style="float: left; width: 100%;">
    <asp:GridView ID="gvAt" DataKeyNames="ArticleID" runat="server" AutoGenerateColumns="False"
        BackColor="White" BorderColor="#CC9966" BorderStyle="None" BorderWidth="1px"
        CellPadding="4" OnRowDeleting="gvAt_RowDeleting" OnSelectedIndexChanged="gvAt_SelectedIndexChanged"
        PageSize="50" Width="100%" AllowPaging="true" OnPageIndexChanged="gvAt_PageIndexChanged"
        OnPageIndexChanging="gvAt_PageIndexChanging">
        <RowStyle BackColor="White" ForeColor="#330099" />
        <Columns>
            <asp:BoundField DataField="STT" HeaderText="STT" ReadOnly="True" SortExpression="STT"
                Visible="false" />
            <asp:BoundField DataField="Title" HeaderText="Tiêu đề" SortExpression="Title" ItemStyle-Width="50%" />
            <asp:BoundField DataField="CategoryName" HeaderText="Danh mục" SortExpression="CategoryName"
                ItemStyle-Width="15%" />
            <asp:BoundField DataField="Username" HeaderText="Người tạo" SortExpression="Username"
                ItemStyle-Width="13%" />
            <asp:CheckBoxField DataField="IsPublish" HeaderText="Hiển thị" ItemStyle-Width="7%" />
            <asp:CheckBoxField DataField="IsHompage" HeaderText="Trang chủ" ItemStyle-Width="6%"
                Visible="false" />
            <asp:TemplateField ItemStyle-Width="13%" HeaderText="Thao tác" ItemStyle-HorizontalAlign="Center">
                <ItemTemplate>
                    <asp:ImageButton ID="btEdit" runat="server" CommandName="Select" ImageUrl="~/AdminCP/images/edit_16x16.gif" />
                    <asp:ImageButton ID="btDelete" runat="server" CommandArgument='<%#Eval("ArticleID") %>'
                        CommandName="Delete" ImageUrl="~/AdminCP/images/delete_16x16.gif" OnClientClick="return confirm('Có muốn xóa bản ghi này? Nhấn OK để xóa!')" />
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
        <FooterStyle BackColor="#FFFFCC" ForeColor="#330099" />
        <PagerStyle BackColor="#FFFFCC" ForeColor="#330099" HorizontalAlign="Center" />
        <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="#663399" />
        <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="#FFFFCC" />
    </asp:GridView>
    <br />
    <asp:Button ID="btnAdd" runat="server" OnClick="btnAdd_Click" Text="Thêm mới" />
</div>
